/*
 * @Author: ReinerLau lk850593913@gmail.com
 * @Date: 2022-11-04 15:17:27
 * @LastEditors: ReinerLau lk850593913@gmail.com
 * @LastEditTime: 2022-11-08 08:59:16
 * @FilePath: \v2.0.0\src\api\disinfect\disinfect-path-setting-map.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

/**
 * @description: 防疫 - 获取路径列表
 * @param {*} params
 * @return {*}
 */
export function getDisinfectPath(params) {
  return request({
    url: "/robot-disinfect-route/v1/list",
    method: "get",
    params: params,
  });
}

/**
 * @description: 防疫 - 获取地图列表
 * @param {*} params
 * @return {*}
 */
export function getDisinfectMap(params) {
  return request({
    url: "/robot-disinfect-map/v1/list",
    method: "get",
    params: params,
  });
}

/**
 * @description: 防疫 - 获取对应地图的充电点列表
 * @param {*} mid
 * @return {*}
 */
export function getDisinfectByMid(mid) {
  return request({
    url: `/robot-disinfect-charge-point/v1/getListByMid/${mid}`,
    method: "get",
  });
}

/**
 * @description: 防疫 - 创建路径
 * @param {*} data
 * @return {*}
 */
export function createDisinfectPath(data) {
  return request({
    url: "/robot-disinfect-route/v1/add",
    method: "post",
    data: data,
  });
}

/**
 * @description: 防疫 - 删除路径
 * @param {*} id
 * @return {*}
 */
export function deleteDisinfectPath(id) {
  return request({
    url: `/robot-disinfect-route/v1/${id}`,
    method: "delete",
  });
}

/**
 * @description: 防疫 - 创建充电点
 * @param {*} data
 * @return {*}
 */
export function createDisinfectChargePoint(data) {
  return request({
    url: "/robot-disinfect-charge-point/v1/create",
    method: "post",
    data,
  });
}

/**
 * @description: 防疫 - 删除充电点
 * @param {*} data
 * @return {*}
 */
export function deleteDisinfectChargePoint(id) {
  return request({
    url: `/robot-disinfect-charge-point/v1/delete/${id}`,
    method: "delete",
  });
}

/**
 * @description: 防疫 - 更新地图
 * @param {*} data
 * @return {*}
 */
export function updateDisinfectMap(data) {
  return request({
    url: "/robot-disinfect-map/v1/update",
    method: "put",
    data: data,
  });
}
